package com.spdb.oa;

import java.util.List;
import java.util.Map;

import org.json.JSONObject;

import com.spdb.oa.exception.OAException;
import com.spdb.oa.type.Version;
import com.spdb.oa.type.Record;
import com.spdb.oa.type.SubmitForm;
import com.spdb.oa.type.Toolbar;
import com.spdb.oa.type.User;
import com.spdb.oa.type.UserListCount;
import com.spdb.oa.type.WFForm;
import com.spdb.oa.type.WorkflowOpinion;

public interface OAService {
	/**
	 * 
	 * 
	 * User->UserListCount
	 * @throws OAException 
	 * 
	 **/
	Map<User, UserListCount>  getListCount() throws OAException;
	
	/**
	 * 
	 * @throws OAException 
	 */
	Map<User, List<Record>> getDBList(int pageSize, int currentPageNo) throws OAException;
	
	/**
	 * 
	 */
	Map<User, List<Record>> getDYList(int pageSize, int currentPageNo);
	
	/**
	 * 
	 */
	Map<User, List<Record>> getCNList(int pageSize, int currentPageNo);
	
	/**
	 * 
	 * @throws OAException 
	 */
	Map<User, List<Record>> getJBList(int pageSize, int currentPageNo) throws OAException;
	
	/**
	 * get the toolbar
	 * @param processId
	 * @param instanceId
	 * @param distributionId default is 0, you can pass anything
	 * @param feedbackParameter
	 * @throws OAException 
	 */
	Toolbar getToolbar(String processId, String instanceId, String distributionId, String feedbackParameter) throws OAException;
	
	/**
	 * get form detailed info
	 * @param processId
	 * @param instanceId
	 * @param distributionId
	 * @param feedbackParameter
	 * @return 
	 * @throws OAException 
	 */
	WFForm getWFForm(String processId, String instanceId, String distributionId, String feedbackParameter) throws OAException;
	
	/**
	 * get submit view
	 * @return 
	 * @throws OAException 
	 */
	SubmitForm getSubmit(Version version, String processId, String instanceId, String distributionId, String feedbackParameter) throws OAException;
	
	/**
	 * get workflow opinion
	 * @return 
	 * @throws OAException 
	 */

	WorkflowOpinion getWorkFlowOpinion(String processId, String instanceId, String distributionId, String feedbackParameter) throws OAException;
	/**
	 * submit form
	 */
	JSONObject submitWF(String jsonStr) throws OAException;


}
